//
//  MyWebViewController.m
//  witeraCustomer
//
//  Created by Mac on 2019/4/23.
//  Copyright © 2019 智慧时代. All rights reserved.
//

#import "MyWebViewController.h"

@interface MyWebViewController ()

@end

@implementation MyWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.webView = [[WKWebView alloc] init];
    self.webView.allowsBackForwardNavigationGestures = YES;
    if (self.Fullurl.length == 0) {
        return;
    }
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.Fullurl]];
    
    [self.webView loadRequest:request];
    [self.view addSubview:self.webView];
    [self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(self.view).offset(-kBottomSafeHeight);
        make.top.mas_equalTo(kNavigationBarHeight);
    }];
    
}


- (void)back
{
    if ([self.webView canGoBack]) {
        [self.webView goBack];
    }else
    {
        [self.navigationController popViewControllerAnimated:YES];
    }
}
@end
